package com.hj.dapp.business.role.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hj.dapp.business.menu.dto.BindMenuDto;
import com.hj.dapp.business.role.model.Role;
import com.hj.dapp.common.request.PageRequest;

import java.security.Principal;
import java.util.List;

/**
 * @author 胡奥程
 * @version 1.0
 * @date 2023/12/29
 */
public interface RoleService {
    /**
     * 获取用户角色列表
     * @param userId
     * @return
     */
   List<Role> getRoleListByUser(Long userId);

    List<Role>   getRoleListByUser(String username);

    List<Role> getRoleList();

    void insertRole(Role role, Principal principal);

    void updateRole(Role role, Principal principal);

    void deleteRole(Long id);

    void bindMenu(BindMenuDto bindMenuDto, Principal principal);

    IPage<Role> page(PageRequest<Role> pageRequest);

    Role get(Long id);

    void edit(Role role, Principal principal);
}
